@if(count($messages) == 0)
    <h2>No Messages</h2>
@else
    <table class="table table-striped">
        <tr>
            <th>Message ID</th>
            <th>Date</th>
            <th>Message</th>
        </tr>
        @foreach($messages as $message)
            <tr>
                <td>{{$message->getMessageId()}}</td>
                <td>{{date_format($message->getInsertionDate(), 'Y-m-d')}}</td>
                <td>{{$message->getMessageText()}}</td>
            </tr>
        @endforeach
    </table>
@endif